package cn.yuanqiao.archive.liyong.domain;

import cn.yuanqiao.common.annotation.Excel;
import cn.yuanqiao.common.exception.ServiceException;
import cn.yuanqiao.common.utils.StringUtils;
import cn.yuanqiao.common.core.domain.BaseEntity;
import cn.yuanqiao.common.utils.SecurityUtils;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 登记档案信息对象 YQ_DA_REGISTER
 *
 * @ProjectName: cn.yuanqiao.archive.liyong.domain
 * @ClassName: YqDaRegister
 * @Author: lenovo
 * @Description: hbWang
 * @Date: 2024/1/26 15:40
 * @Version: 1.0
 **/
public class YqDaRegister extends BaseEntity {
    private static final long serialVersionUID = 1L;

    private final String BIGTABLENAME = "_YQ_DA_REGISTER";

    public YqDaRegister() {
        String tenantCode = SecurityUtils.getTenantCode();
        if (StringUtils.isEmpty(tenantCode)) {
            throw new ServiceException("TenantCode is null");
        } else {
            this.tableName = tenantCode.toUpperCase() + BIGTABLENAME;
        }
    }

    private String tableName;


    /**
     * 主键
     */
    private String id;

    /**
     * 登记表主键
     */
    @Excel(name = "登记表主键")
    private String consultId;

    /**
     * 档案id
     */
    @Excel(name = "档案id")
    private String daId;

    /**
     * 档案分表表名
     */
    @Excel(name = "档案分表表名")
    private String subTableName;

    /**
     * 题名
     */
    @Excel(name = "题名")
    private String title;

    /**
     * 档号
     */
    @Excel(name = "档号")
    private String dh;

    /**
     * 档案信息
     */
    @Excel(name = "档案信息")
    private String daMsg;

    /**
     * 用户id
     */
    @Excel(name = "用户id")
    private String userId;

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getTableName() {
        return tableName;
    }

    public void setTableName(String tableName) {
        this.tableName = tableName;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getId() {
        return id;
    }

    public void setConsultId(String consultId) {
        this.consultId = consultId;
    }

    public String getConsultId() {
        return consultId;
    }

    public void setDaId(String daId) {
        this.daId = daId;
    }

    public String getDaId() {
        return daId;
    }

    public String getSubTableName() {
        return subTableName;
    }

    public void setSubTableName(String subTableName) {
        this.subTableName = subTableName;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getTitle() {
        return title;
    }

    public void setDh(String dh) {
        this.dh = dh;
    }

    public String getDh() {
        return dh;
    }

    public void setDaMsg(String daMsg) {
        this.daMsg = daMsg;
    }

    public String getDaMsg() {
        return daMsg;
    }

    @Override
    public String toString() {
        return "YqDaRegister{" +
                "id='" + id + '\'' +
                ", consultId='" + consultId + '\'' +
                ", daId='" + daId + '\'' +
                ", title='" + title + '\'' +
                ", dh='" + dh + '\'' +
                ", daMsg='" + daMsg + '\'' +
                ", subTableName='" + subTableName + '\'' +
                ", userId='" + userId + '\'' +
                '}';
    }
}
